package MsgPackage;

/**
 * @author Omri Barda		039725890 
 * @author Amit Joseph		034608547
 * @author Gilad Shpigel  	300162393
 * @author Elad Elbaz		040539959
 * @version June 2012
 */

import java.util.ArrayList;
import entities.ExtractedExam;
import entities.Lecturer;

public class GetUnlockedExamsPack extends MessagePack {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Lecturer lctrr;
	private ArrayList<ExtractedExam> extExmsLst = null;

	/**
	 * constructor
	 * 
	 * @param lctrr
	 */
	public GetUnlockedExamsPack(Lecturer lctrr) {
		this.lctrr = lctrr;
		this.op = OpType.GetUnlockedExams;
	}

	/**
	 * 
	 * @return the lecturer
	 */
	public Lecturer getLecturer() {
		return lctrr;
	}

	/**
	 * 
	 * @param ExmsLst
	 *            the exams to be added
	 */
	public void addExams(ArrayList<ExtractedExam> ExmsLst) {
		if (extExmsLst == null)
			extExmsLst = new ArrayList<ExtractedExam>();
		extExmsLst.addAll(ExmsLst);
	}

	/**
	 * 
	 * @param Exm
	 *            to be added
	 */
	public void addExam(ExtractedExam Exm) {
		if (extExmsLst == null)
			extExmsLst = new ArrayList<ExtractedExam>();
		extExmsLst.add(Exm);
	}

	/**
	 * 
	 * @return the list of exams
	 */
	public ArrayList<ExtractedExam> getExtractedExamsList() {
		return extExmsLst;
	}
}
